package com.bcbim.api_web.application.controller;

import com.bcbim.authentication_interface.application.service.ApplicationService;
import com.bcbim.authentication_interface.application.vo.ApplicationVO;
import com.bcbim.authentication_interface.util.AuthUtil;
import com.bcbim.common.response.vo.ReturnMsg;
import com.bcbim.model_server_interface.file.service.FileService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: ye
 * @Date: 2022/7/8
 * @Version: V1.0
 **/
@RestController
@RequestMapping("/application")
public class ApplicationController {

    @Reference(protocol = "dubbo", group = "application", version = "1.0.0")
    private ApplicationService applicationServiceImpl;
    @Reference(protocol = "dubbo", group = "file", version = "1.0.0")
    private FileService fileServiceImpl;
    /**
     * @Description: 查询用户信息
     * @Param:
     * @Return: ReturnMsg
     * @Author: ye
     * @Date: 2022/7/8
     */
    @PostMapping("getApplication")
    public ReturnMsg getApplication() {
        ApplicationVO applicationVO = applicationServiceImpl.getUserApplication(AuthUtil.getUserIdDecrypt());
        return ReturnMsg.consSuccess(applicationVO);
    }

}
